﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Text;
using MySite.Model;
using MySite.Timer;
using MySite.BLL;
using MySite.Enum;

namespace MySite.Controllers
{
    [HandleError]
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            int pageCount = 0;

            ViewData["StatusInfo"] = new Status().Query("", " PID desc ", 13, ref pageCount);

            ViewData["BlogCnInfo"] = new Blog().Query(string.Format("[Type]='{0}'", BlogType.Blogcn), 13, "PID desc", ref pageCount);
            ViewData["CnBetaInfo"] = new Blog().Query(string.Format("[Type]='{0}'", BlogType.CnBeta), 15, "PID desc", ref pageCount);

            return View();
        }

        public ActionResult About()
        {
            return View();
        }
    }
}
